3.1288 \(\int x^2 (a+b \tan ^{-1}(c x)) (d+e \log (1+c^2 x^2)) \, dx\)

Optimal. Leaf size=213 \[ \frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )+\frac{2 a e x}{3 c^2}-\frac{2 a e \tan ^{-1}(c x)}{3 c^3}-\frac{2}{9} a e x^3-\frac{b x^2 \left (e \log \left (c^2 x^2+1\right )+d\right )}{6 c}+\frac{b \log \left (c^2 x^2+1\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )}{6 c^3}-\frac{b e \log ^2\left (c^2 x^2+1\right )}{12 c^3}-\frac{11 b e \log \left (c^2 x^2+1\right )}{18 c^3}+\frac{2 b e x \tan ^{-1}(c x)}{3 c^2}-\frac{b e \tan ^{-1}(c x)^2}{3 c^3}+\frac{5 b e x^2}{18 c}-\frac{2}{9} b e x^3 \tan ^{-1}(c x) \]

[Out]

(2*a*e*x)/(3*c^2) + (5*b*e*x^2)/(18*c) - (2*a*e*x^3)/9 - (2*a*e*ArcTan[c*x])/(3*c^3) + (2*b*e*x*ArcTan[c*x])/(
3*c^2) - (2*b*e*x^3*ArcTan[c*x])/9 - (b*e*ArcTan[c*x]^2)/(3*c^3) - (11*b*e*Log[1 + c^2*x^2])/(18*c^3) - (b*e*L
og[1 + c^2*x^2]^2)/(12*c^3) - (b*x^2*(d + e*Log[1 + c^2*x^2]))/(6*c) + (x^3*(a + b*ArcTan[c*x])*(d + e*Log[1 +
 c^2*x^2]))/3 + (b*Log[1 + c^2*x^2]*(d + e*Log[1 + c^2*x^2]))/(6*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.569288, antiderivative size = 213, normalized size of antiderivative = 1., number of steps used = 21, number of rules used = 15, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.577, Rules used = {4852, 266, 43, 5021, 6725, 801, 635, 203, 260, 4916, 4846, 4884, 2475, 2390, 2301} \[ \frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )+\frac{2 a e x}{3 c^2}-\frac{2 a e \tan ^{-1}(c x)}{3 c^3}-\frac{2}{9} a e x^3-\frac{b x^2 \left (e \log \left (c^2 x^2+1\right )+d\right )}{6 c}+\frac{b \log \left (c^2 x^2+1\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )}{6 c^3}-\frac{b e \log ^2\left (c^2 x^2+1\right )}{12 c^3}-\frac{11 b e \log \left (c^2 x^2+1\right )}{18 c^3}+\frac{2 b e x \tan ^{-1}(c x)}{3 c^2}-\frac{b e \tan ^{-1}(c x)^2}{3 c^3}+\frac{5 b e x^2}{18 c}-\frac{2}{9} b e x^3 \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]),x]

[Out]

(2*a*e*x)/(3*c^2) + (5*b*e*x^2)/(18*c) - (2*a*e*x^3)/9 - (2*a*e*ArcTan[c*x])/(3*c^3) + (2*b*e*x*ArcTan[c*x])/(
3*c^2) - (2*b*e*x^3*ArcTan[c*x])/9 - (b*e*ArcTan[c*x]^2)/(3*c^3) - (11*b*e*Log[1 + c^2*x^2])/(18*c^3) - (b*e*L
og[1 + c^2*x^2]^2)/(12*c^3) - (b*x^2*(d + e*Log[1 + c^2*x^2]))/(6*c) + (x^3*(a + b*ArcTan[c*x])*(d + e*Log[1 +
 c^2*x^2]))/3 + (b*Log[1 + c^2*x^2]*(d + e*Log[1 + c^2*x^2]))/(6*c^3)

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 5021

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + Log[(f_.) + (g_.)*(x_)^2]*(e_.))*(x_)^(m_.), x_Symbol] :> With
[{u = IntHide[x^m*(a + b*ArcTan[c*x]), x]}, Dist[d + e*Log[f + g*x^2], u, x] - Dist[2*e*g, Int[ExpandIntegrand
[(x*u)/(f + g*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, g}, x] && IntegerQ[m] && NeQ[m, -1]

Rule 6725

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4916

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2/
e, Int[(f*x)^(m - 2)*(a + b*ArcTan[c*x])^p, x], x] - Dist[(d*f^2)/e, Int[((f*x)^(m - 2)*(a + b*ArcTan[c*x])^p)
/(d + e*x^2), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rubi steps

\begin{align*} \int x^2 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right ) \, dx &=-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\left (2 c^2 e\right ) \int \left (\frac{x^3 \left (-b+2 a c x+2 b c x \tan ^{-1}(c x)\right )}{6 c \left (1+c^2 x^2\right )}+\frac{b x \log \left (1+c^2 x^2\right )}{6 c^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{(b e) \int \frac{x \log \left (1+c^2 x^2\right )}{1+c^2 x^2} \, dx}{3 c}-\frac{1}{3} (c e) \int \frac{x^3 \left (-b+2 a c x+2 b c x \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx\\ &=-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{(b e) \operatorname{Subst}\left (\int \frac{\log \left (1+c^2 x\right )}{1+c^2 x} \, dx,x,x^2\right )}{6 c}-\frac{1}{3} (c e) \int \left (\frac{x^3 (-b+2 a c x)}{1+c^2 x^2}+\frac{2 b c x^4 \tan ^{-1}(c x)}{1+c^2 x^2}\right ) \, dx\\ &=-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{(b e) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,1+c^2 x^2\right )}{6 c^3}-\frac{1}{3} (c e) \int \frac{x^3 (-b+2 a c x)}{1+c^2 x^2} \, dx-\frac{1}{3} \left (2 b c^2 e\right ) \int \frac{x^4 \tan ^{-1}(c x)}{1+c^2 x^2} \, dx\\ &=-\frac{b e \log ^2\left (1+c^2 x^2\right )}{12 c^3}-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{1}{3} (2 b e) \int x^2 \tan ^{-1}(c x) \, dx+\frac{1}{3} (2 b e) \int \frac{x^2 \tan ^{-1}(c x)}{1+c^2 x^2} \, dx-\frac{1}{3} (c e) \int \left (-\frac{2 a}{c^3}-\frac{b x}{c^2}+\frac{2 a x^2}{c}+\frac{2 a+b c x}{c^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=\frac{2 a e x}{3 c^2}+\frac{b e x^2}{6 c}-\frac{2}{9} a e x^3-\frac{2}{9} b e x^3 \tan ^{-1}(c x)-\frac{b e \log ^2\left (1+c^2 x^2\right )}{12 c^3}-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{e \int \frac{2 a+b c x}{1+c^2 x^2} \, dx}{3 c^2}+\frac{(2 b e) \int \tan ^{-1}(c x) \, dx}{3 c^2}-\frac{(2 b e) \int \frac{\tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{3 c^2}+\frac{1}{9} (2 b c e) \int \frac{x^3}{1+c^2 x^2} \, dx\\ &=\frac{2 a e x}{3 c^2}+\frac{b e x^2}{6 c}-\frac{2}{9} a e x^3+\frac{2 b e x \tan ^{-1}(c x)}{3 c^2}-\frac{2}{9} b e x^3 \tan ^{-1}(c x)-\frac{b e \tan ^{-1}(c x)^2}{3 c^3}-\frac{b e \log ^2\left (1+c^2 x^2\right )}{12 c^3}-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}-\frac{(2 a e) \int \frac{1}{1+c^2 x^2} \, dx}{3 c^2}-\frac{(b e) \int \frac{x}{1+c^2 x^2} \, dx}{3 c}-\frac{(2 b e) \int \frac{x}{1+c^2 x^2} \, dx}{3 c}+\frac{1}{9} (b c e) \operatorname{Subst}\left (\int \frac{x}{1+c^2 x} \, dx,x,x^2\right )\\ &=\frac{2 a e x}{3 c^2}+\frac{b e x^2}{6 c}-\frac{2}{9} a e x^3-\frac{2 a e \tan ^{-1}(c x)}{3 c^3}+\frac{2 b e x \tan ^{-1}(c x)}{3 c^2}-\frac{2}{9} b e x^3 \tan ^{-1}(c x)-\frac{b e \tan ^{-1}(c x)^2}{3 c^3}-\frac{b e \log \left (1+c^2 x^2\right )}{2 c^3}-\frac{b e \log ^2\left (1+c^2 x^2\right )}{12 c^3}-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}+\frac{1}{9} (b c e) \operatorname{Subst}\left (\int \left (\frac{1}{c^2}-\frac{1}{c^2 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac{2 a e x}{3 c^2}+\frac{5 b e x^2}{18 c}-\frac{2}{9} a e x^3-\frac{2 a e \tan ^{-1}(c x)}{3 c^3}+\frac{2 b e x \tan ^{-1}(c x)}{3 c^2}-\frac{2}{9} b e x^3 \tan ^{-1}(c x)-\frac{b e \tan ^{-1}(c x)^2}{3 c^3}-\frac{11 b e \log \left (1+c^2 x^2\right )}{18 c^3}-\frac{b e \log ^2\left (1+c^2 x^2\right )}{12 c^3}-\frac{b x^2 \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c}+\frac{1}{3} x^3 \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )+\frac{b \log \left (1+c^2 x^2\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{6 c^3}\\ \end{align*}

Mathematica [A]  time = 0.131023, size = 171, normalized size = 0.8 \[ \frac{2 c x \left (6 a c^2 d x^2-4 a e \left (c^2 x^2-3\right )+b c x (5 e-3 d)\right )+2 \log \left (c^2 x^2+1\right ) \left (6 a c^3 e x^3-b e \left (3 c^2 x^2+11\right )+3 b d\right )-4 \tan ^{-1}(c x) \left (6 a e+b c x \left (-3 c^2 d x^2+2 c^2 e x^2-6 e\right )-3 b c^3 e x^3 \log \left (c^2 x^2+1\right )\right )+3 b e \log ^2\left (c^2 x^2+1\right )-12 b e \tan ^{-1}(c x)^2}{36 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]),x]

[Out]

(2*c*x*(b*c*(-3*d + 5*e)*x + 6*a*c^2*d*x^2 - 4*a*e*(-3 + c^2*x^2)) - 12*b*e*ArcTan[c*x]^2 + 2*(3*b*d + 6*a*c^3
*e*x^3 - b*e*(11 + 3*c^2*x^2))*Log[1 + c^2*x^2] + 3*b*e*Log[1 + c^2*x^2]^2 - 4*ArcTan[c*x]*(6*a*e + b*c*x*(-6*
e - 3*c^2*d*x^2 + 2*c^2*e*x^2) - 3*b*c^3*e*x^3*Log[1 + c^2*x^2]))/(36*c^3)

________________________________________________________________________________________

Maple [C]  time = 1.43, size = 4146, normalized size = 19.5 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1)),x)

[Out]

-1/6*b*d*x^2/c+2/3*a*e*x/c^2-2/3*a*e*arctan(c*x)/c^3-2/9*b*e*x^3*arctan(c*x)-1/6*I*b*arctan(c*x)*Pi*csgn(I*(1+
I*c*x)^2/(c^2*x^2+1)/((1+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2/(c^2*x^2+1)+1))*csgn(I*((1+I*c*x)^2/(c^2*x^2+1)+1)^2)^2-1/6/c^3*
b*csgn(I*(1+I*c*x)^2/(c^2*x^2+1)/((1+I*c*x)^2/(c^2*x^2+1)+1)^2)^2*arctan(c*x)*Pi*e*csgn(I/((1+I*c*x)^2/(c^2*x^
2+1)+1)^2)+1/6/c^3*b*csgn(I*(1+I*c*x)^2/(c^2*x^2+1))*csgn(I*(1+I*c*x)/(c^2*x^2+1)^(1/2))^2*arctan(c*x)*Pi*e-1/
6*I*b*arctan(c*x)*Pi*csgn(I*(1+I*c*x)^2/(c^2*x^2+1))^3*x^3*e+1/6*I*b*arctan(c*x)*Pi*csgn(I*((1+I*c*x)^2/(c^2*x
^2+1)+1)^2)^3*x^3*e+1/3/c^3*b*e*(2*arctan(c*x)*x^3*c^3-c^2*x^2+2*I*arctan(c*x)-2*ln((1+I*c*x)^2/(c^2*x^2+1)+1)
-1)*ln((1+I*c*x)/(c^2*x^2+1)^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.50211, size = 286, normalized size = 1.34 \begin{align*} \frac{1}{3} \, a d x^{3} + \frac{1}{9} \,{\left (3 \, x^{3} \log \left (c^{2} x^{2} + 1\right ) - 2 \, c^{2}{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b e \arctan \left (c x\right ) + \frac{1}{6} \,{\left (2 \, x^{3} \arctan \left (c x\right ) - c{\left (\frac{x^{2}}{c^{2}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d + \frac{1}{9} \,{\left (3 \, x^{3} \log \left (c^{2} x^{2} + 1\right ) - 2 \, c^{2}{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} a e + \frac{{\left (10 \, c^{2} x^{2} + 12 \, \arctan \left (c x\right )^{2} - 2 \,{\left (3 \, c^{2} x^{2} + 11\right )} \log \left (c^{2} x^{2} + 1\right ) + 3 \, \log \left (c^{2} x^{2} + 1\right )^{2}\right )} b e}{36 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="maxima")

[Out]

1/3*a*d*x^3 + 1/9*(3*x^3*log(c^2*x^2 + 1) - 2*c^2*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*e*arctan(c*x) +
 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d + 1/9*(3*x^3*log(c^2*x^2 + 1) - 2*c^2*((c^2*
x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*a*e + 1/36*(10*c^2*x^2 + 12*arctan(c*x)^2 - 2*(3*c^2*x^2 + 11)*log(c^2*x^
2 + 1) + 3*log(c^2*x^2 + 1)^2)*b*e/c^3

________________________________________________________________________________________

Fricas [A]  time = 1.29493, size = 406, normalized size = 1.91 \begin{align*} \frac{24 \, a c e x + 4 \,{\left (3 \, a c^{3} d - 2 \, a c^{3} e\right )} x^{3} - 12 \, b e \arctan \left (c x\right )^{2} + 3 \, b e \log \left (c^{2} x^{2} + 1\right )^{2} - 2 \,{\left (3 \, b c^{2} d - 5 \, b c^{2} e\right )} x^{2} + 4 \,{\left (6 \, b c e x +{\left (3 \, b c^{3} d - 2 \, b c^{3} e\right )} x^{3} - 6 \, a e\right )} \arctan \left (c x\right ) + 2 \,{\left (6 \, b c^{3} e x^{3} \arctan \left (c x\right ) + 6 \, a c^{3} e x^{3} - 3 \, b c^{2} e x^{2} + 3 \, b d - 11 \, b e\right )} \log \left (c^{2} x^{2} + 1\right )}{36 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="fricas")

[Out]

1/36*(24*a*c*e*x + 4*(3*a*c^3*d - 2*a*c^3*e)*x^3 - 12*b*e*arctan(c*x)^2 + 3*b*e*log(c^2*x^2 + 1)^2 - 2*(3*b*c^
2*d - 5*b*c^2*e)*x^2 + 4*(6*b*c*e*x + (3*b*c^3*d - 2*b*c^3*e)*x^3 - 6*a*e)*arctan(c*x) + 2*(6*b*c^3*e*x^3*arct
an(c*x) + 6*a*c^3*e*x^3 - 3*b*c^2*e*x^2 + 3*b*d - 11*b*e)*log(c^2*x^2 + 1))/c^3

________________________________________________________________________________________

Sympy [A]  time = 12.9119, size = 258, normalized size = 1.21 \begin{align*} \begin{cases} \frac{a d x^{3}}{3} + \frac{a e x^{3} \log{\left (c^{2} x^{2} + 1 \right )}}{3} - \frac{2 a e x^{3}}{9} + \frac{2 a e x}{3 c^{2}} - \frac{2 a e \operatorname{atan}{\left (c x \right )}}{3 c^{3}} + \frac{b d x^{3} \operatorname{atan}{\left (c x \right )}}{3} + \frac{b e x^{3} \log{\left (c^{2} x^{2} + 1 \right )} \operatorname{atan}{\left (c x \right )}}{3} - \frac{2 b e x^{3} \operatorname{atan}{\left (c x \right )}}{9} - \frac{b d x^{2}}{6 c} - \frac{b e x^{2} \log{\left (c^{2} x^{2} + 1 \right )}}{6 c} + \frac{5 b e x^{2}}{18 c} + \frac{2 b e x \operatorname{atan}{\left (c x \right )}}{3 c^{2}} + \frac{b d \log{\left (c^{2} x^{2} + 1 \right )}}{6 c^{3}} + \frac{b e \log{\left (c^{2} x^{2} + 1 \right )}^{2}}{12 c^{3}} - \frac{11 b e \log{\left (c^{2} x^{2} + 1 \right )}}{18 c^{3}} - \frac{b e \operatorname{atan}^{2}{\left (c x \right )}}{3 c^{3}} & \text{for}\: c \neq 0 \\\frac{a d x^{3}}{3} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atan(c*x))*(d+e*ln(c**2*x**2+1)),x)

[Out]

Piecewise((a*d*x**3/3 + a*e*x**3*log(c**2*x**2 + 1)/3 - 2*a*e*x**3/9 + 2*a*e*x/(3*c**2) - 2*a*e*atan(c*x)/(3*c
**3) + b*d*x**3*atan(c*x)/3 + b*e*x**3*log(c**2*x**2 + 1)*atan(c*x)/3 - 2*b*e*x**3*atan(c*x)/9 - b*d*x**2/(6*c
) - b*e*x**2*log(c**2*x**2 + 1)/(6*c) + 5*b*e*x**2/(18*c) + 2*b*e*x*atan(c*x)/(3*c**2) + b*d*log(c**2*x**2 + 1
)/(6*c**3) + b*e*log(c**2*x**2 + 1)**2/(12*c**3) - 11*b*e*log(c**2*x**2 + 1)/(18*c**3) - b*e*atan(c*x)**2/(3*c
**3), Ne(c, 0)), (a*d*x**3/3, True))

________________________________________________________________________________________

Giac [A]  time = 1.33773, size = 486, normalized size = 2.28 \begin{align*} \frac{6 \, \pi b c^{3} x^{3} e \log \left (c^{2} x^{2} + 1\right ) \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 4 \, \pi b c^{3} x^{3} e \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 12 \, b c^{3} x^{3} \arctan \left (\frac{1}{c x}\right ) e \log \left (c^{2} x^{2} + 1\right ) + 12 \, b c^{3} d x^{3} \arctan \left (c x\right ) + 8 \, b c^{3} x^{3} \arctan \left (\frac{1}{c x}\right ) e + 12 \, a c^{3} x^{3} e \log \left (c^{2} x^{2} + 1\right ) + 12 \, a c^{3} d x^{3} - 8 \, a c^{3} x^{3} e - 6 \, b c^{2} x^{2} e \log \left (c^{2} x^{2} + 1\right ) + 12 \, \pi b c x e \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 6 \, b c^{2} d x^{2} + 10 \, b c^{2} x^{2} e + 6 \, \pi ^{2} b e \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) + 12 \, \pi b \arctan \left (\frac{1}{c x}\right ) e \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 24 \, b c x \arctan \left (\frac{1}{c x}\right ) e - 6 \, \pi ^{2} b e + 24 \, a c x e - 12 \, \pi b \arctan \left (c x\right ) e - 12 \, \pi b \arctan \left (\frac{1}{c x}\right ) e - 12 \, b \arctan \left (\frac{1}{c x}\right )^{2} e + 3 \, b e \log \left (c^{2} x^{2} + 1\right )^{2} - 24 \, a \arctan \left (c x\right ) e + 6 \, b d \log \left (c^{2} x^{2} + 1\right ) - 22 \, b e \log \left (c^{2} x^{2} + 1\right )}{36 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="giac")

[Out]

1/36*(6*pi*b*c^3*x^3*e*log(c^2*x^2 + 1)*sgn(c)*sgn(x) - 4*pi*b*c^3*x^3*e*sgn(c)*sgn(x) - 12*b*c^3*x^3*arctan(1
/(c*x))*e*log(c^2*x^2 + 1) + 12*b*c^3*d*x^3*arctan(c*x) + 8*b*c^3*x^3*arctan(1/(c*x))*e + 12*a*c^3*x^3*e*log(c
^2*x^2 + 1) + 12*a*c^3*d*x^3 - 8*a*c^3*x^3*e - 6*b*c^2*x^2*e*log(c^2*x^2 + 1) + 12*pi*b*c*x*e*sgn(c)*sgn(x) -
6*b*c^2*d*x^2 + 10*b*c^2*x^2*e + 6*pi^2*b*e*sgn(c)*sgn(x) + 12*pi*b*arctan(1/(c*x))*e*sgn(c)*sgn(x) - 24*b*c*x
*arctan(1/(c*x))*e - 6*pi^2*b*e + 24*a*c*x*e - 12*pi*b*arctan(c*x)*e - 12*pi*b*arctan(1/(c*x))*e - 12*b*arctan
(1/(c*x))^2*e + 3*b*e*log(c^2*x^2 + 1)^2 - 24*a*arctan(c*x)*e + 6*b*d*log(c^2*x^2 + 1) - 22*b*e*log(c^2*x^2 +
1))/c^3